<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>基表维护</title>
<link href='https://fonts.googleapis.com/css?family=PT+Sans:400,700'
	rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../../css/xtgl/tableManage.css">
<link rel="stylesheet"
	href="../../plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet"
	href="../../plugins/bootstrap/css/bootstrap-table.min.css">
<link rel="stylesheet"
	href="../../plugins/ztree/zTreeStyle/zTreeStyle.css" type="text/css">
	<link rel="stylesheet" href="../../css/form.css">
</head>
<body>
	<!-- <ol class="breadcrumb">
		<li><a href="#">系统管理</a></li>
		<li><a href="#">基表管理</a></li>
	</ol> -->
	<div class="titlediv">系统管理/基表管理</div>
	<div class="container-fluid laydiv">
		<div class="row">
			<div class="col-md-2" style="padding-left: 50px;">
				<!-- col-md-offset-1  -->
				当前基表为：<label id="tableName">八音分类</label>
			</div>
			<div class="col-md-10">
				<div class="btn-group-vertical">
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_byfl&八音分类基表">八音分类</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_yqzl&乐器种类基表">乐器种类</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_zq&族群基表">族群</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_psjd&拍摄角度基表">拍摄角度</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_jljzlx&记录介质类型表基表">记录介质类型表</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_wjgs&文件格式表基表">文件格式表</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_sxcjgs&声像采集格式基表">声像采集格式</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_cjfs&采集方式基表">采集方式</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_cyyz&常用语种基表">常用语种基表</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_fsjz&发声机制基表">发声机制</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_bblx&标本类型基表">标本类型</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_syysjq&声源原始激起基表">声源原始激起</button>
					<button class="btButton" tableType='1' type="button"
						class="btn btn-default" value="mb_gy_zyqxlx&资源权限类型基表">资源权限类型</button>
					<button class="btButton" tableType='2' type="button"
						class="btn btn-default" value="mb_gy_nd&年代基表">年代</button>
					<button class="btButton" tableType='3' type="button"
						class="btn btn-default" value="mb_gy_hsfl&霍萨分类基表">霍萨分类</button>
					<button class="btButton" tableType='3' type="button"
						class="btn btn-default" value="mb_gy_mjfl&民间分类基表">民间分类</button>
					<button class="btButton" tableType='3' type="button"
						class="btn btn-default" value="mb_gy_yqfl&乐器分类基表">乐器分类</button>
					<button class="btButton" tableType='3' type="button"
						class="btn btn-default" value="mb_gy_yy&语源基表">语源</button>
					<button class="btButton" tableType='3' type="button"
						class="btn btn-default" value="mb_gy_cz&材质基表">材质</button>
					<button class="btButton" tableType='3' type="button"
						class="btn btn-default" value="mb_gy_dq&地区基表">地区</button>
				</div>
			</div>
		</div>

		<div id="normaldiv">
			<button id="btn_table_add" type="button"
				class="btn btn-warning btn-warning ladda-button" data-style="expand-left"
				data-size="xs" style="margin: 10px 30px;" onclick="addData();">添加</button>
			<table class="table_list_box" id="data-table"></table>
		</div>
		<div id="multidiv" class="row" style="display: none;">
			<div class="col-sm-3">
				<ul id="ztree1" class="ztree"></ul>
			</div>
			<div class="col-sm-9">
				<div>
					<button type="button" class="btn btn-warning btn-warning ladda-button"
						data-style="expand-left" data-size="xs" style="margin: 10px 30px;"
						onclick="openTopTreeModalAdd()">新增根节点</button>
					<button type="button" class="btn btn-warning btn-warning ladda-button"
						data-style="expand-left" data-size="xs" style="margin: 10px 30px;"
						onclick="openTreeModalAdd()">新增下级</button>
					<button type="button" class="btn btn-warning btn-warning ladda-button"
						data-style="expand-left" data-size="xs" style="margin: 10px 30px;"
						onclick="updateTreeNode()">修改</button>
					<button type="button" class="btn btn-warning ladda-button"
						data-style="expand-left" data-size="xs" style="margin: 10px 30px;"
						onclick="deleteTreeNode()">删除</button>
				</div>
				<table class="table table-striped" id="multi-table"></table>
			</div>
		</div>
	</div>
	<!-- 新增基表数据开始 -->
	<div class="modal fade" id="basictableModal" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">添加基表数据</h4>
				</div>
				<div class="modal-body">
					<div class="container-fluid laydiv">
						<form id="addForm" enctype="text/plain">
							<div class="row">
								<div class="col-md-2">
									<span>名称：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" name="name" id="name"
										required='true'>
								</div>
							</div>
							<!-- <div class="row">
							<div class="col-md-2">
							<span>编码：</span>
						</div>
						<div class="col-md-10">
							<input type="text" class="form-control" name="code" id="code">
						</div>
					</div> -->
							<div class="row" id="sortedRow">
								<div class="col-md-2">
									<span>排序：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" id="sorted"
										required='true'>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>描述：</span>
								</div>
								<div class="col-md-10">
									<textarea class="form-control" rows="3" name="description"
										id="description"></textarea>
								</div>
							</div>
							<input name="id" id="id" type="hidden">
						</form>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary"
						onclick="addConfirm()">保存</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 新增基表数据结束 -->
	<!-- 新增年代基表数据开始 -->
	<div class="modal fade" id="yeartableModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title">添加基表数据</h4>
				</div>
				<div class="modal-body">
					<div class="container-fluid laydiv">
						<form id="yearsForm" enctype="text/plain">
							<div class="row">
								<div class="col-md-2">
									<span>国家：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" name="country"
										id="country" required='true'>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>朝代：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" name="Dynasty"
										id="Dynasty" required='true'>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>年号：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" id="years" name='years'>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>起始年：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" id="startYear"
										name='startYear' required='true'>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>结束年：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" id="endYear"
										name='endYear' required='true'>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>君主：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" id="emperor"
										name='emperor'>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>描述：</span>
								</div>
								<div class="col-md-10">
									<textarea class="form-control" rows="3" name=remark id="remark"></textarea>
								</div>
							</div>
							<input name="id" id="yearid" type="hidden">
						</form>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary"
						onclick="addYearTableConfirm()">保存</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 新增基表数据结束 -->


	<!-- 新增多级基表数据开始 -->
	<div class="modal fade" id="multiModal" tabindex="-1" role="dialog"
		aria-labelledby="multiModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="multiModalLabel">新增基表数据</h4>
				</div>
				<div class="modal-body">
					<div class="container-fluid laydiv">
						<form id="form_multi" enctype="text/plain">
							<div class="row">
								<div class="col-md-2">
									<span>父节点：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" id="parentname"
										name="parentname" readonly> <input type="hidden"
										class="form-control" id="parentid" name="parentid">
								</div>
							</div>

							<div class="row">
								<div class="col-md-2">
									<span>名称：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" name="name" />
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>编码：</span>
								</div>
								<div class="col-md-10">
									<input type="text" class="form-control" name="code" />
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<span>描述：</span>
								</div>
								<div class="col-md-10">
									<textarea class="form-control" rows="3" name="description"></textarea>
								</div>
							</div>
							<input id="id" name="id" type="hidden" />
						</form>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" id="btn_add"
						onclick="addMultiConfirm()">保存</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 新增多级基表数据结束 -->
</body>
<script src="../../js/jquery-2.0.0.min.js"></script>
<script src="../../plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="../../plugins/bootstrap/js/bootstrap-table.min.js"></script>
<script src="../../plugins/bootstrap/js/bootstrap-table-zh-CN.js"></script>
<script type="text/javascript"
	src="../../plugins/bootbox/bootbox.min.js"></script>
<script type="text/javascript"
	src="../../plugins/ztree/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript"
	src="../../plugins/ztree/js/jquery.ztree.exhide.min.js"></script>
<script type="text/javascript"
	src="../../plugins/ztree/js/jquery.ztree.exedit.min.js"></script>
<script src="../../js/common.js"></script>
<script src="../../js/tableManage.js"></script>
</html>